package com.piano.manage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.piano.manage.mapper.TPaymentMapper;
import com.piano.manage.domain.TPayment;
import com.piano.manage.service.ITPaymentService;
import com.piano.common.support.Convert;

/**
 * 招生提成 服务层实现
 * 
 * @author pinao
 * @date 2019-02-26
 */
@Service
public class TPaymentServiceImpl implements ITPaymentService 
{
	@Autowired
	private TPaymentMapper tPaymentMapper;

	/**
     * 查询招生提成信息
     * 
     * @param id 招生提成ID
     * @return 招生提成信息
     */
    @Override
	public TPayment selectTPaymentById(Integer id)
	{
	    return tPaymentMapper.selectTPaymentById(id);
	}
	
	/**
     * 查询招生提成列表
     * 
     * @param tPayment 招生提成信息
     * @return 招生提成集合
     */
	@Override
	public List<TPayment> selectTPaymentList(TPayment tPayment)
	{
	    return tPaymentMapper.selectTPaymentList(tPayment);
	}
	
    /**
     * 新增招生提成
     * 
     * @param tPayment 招生提成信息
     * @return 结果
     */
	@Override
	public int insertTPayment(TPayment tPayment)
	{
	    return tPaymentMapper.insertTPayment(tPayment);
	}
	
	/**
     * 修改招生提成
     * 
     * @param tPayment 招生提成信息
     * @return 结果
     */
	@Override
	public int updateTPayment(TPayment tPayment)
	{
	    return tPaymentMapper.updateTPayment(tPayment);
	}

	/**
     * 删除招生提成对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTPaymentByIds(String ids)
	{
		return tPaymentMapper.deleteTPaymentByIds(Convert.toStrArray(ids));
	}
	
}
